#ifndef BULLETFRAMELISTENER_H
#define BULLETFRAMELISTENER_H

#include "OgreBulletDynamicsRigidBody.h"				 // for OgreBullet
 #include "Shapes/OgreBulletCollisionsStaticPlaneShape.h" // for static planes
 #include "Shapes/OgreBulletCollisionsBoxShape.h"		 // for Boxes

class BulletFrameListener : public Ogre::FrameListener
{
public:
	BulletFrameListener(Ogre::SceneManager*, Ogre::Vector3&, Ogre::AxisAlignedBox&);
	virtual ~BulletFrameListener(void);

private:
	Ogre::SceneManager* mSceneMgr; 
 	OgreBulletDynamics::DynamicsWorld *mWorld;	// OgreBullet World
 	OgreBulletCollisions::DebugDrawer *debugDrawer;
 	int mNumEntitiesInstanced;
 
 	std::deque<OgreBulletDynamics::RigidBody *>         mBodies;
 	std::deque<OgreBulletCollisions::CollisionShape *>  mShapes;

public:
	bool frameStarted(const FrameEvent&);
	bool frameEnded(const FrameEvent&);
	virtual bool processUnbufferedKeyInput(const FrameEvent&);
};

#endif